#! /usr/bin/env python

PACKAGE='openni_camera'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

# TODO Only offer modes supported by known hardware
output_mode_enum = gen.enum([  gen.const(  "SXGA_15Hz", int_t, 1, "1280x1024@15Hz"),
                               gen.const(   "VGA_30Hz", int_t, 2, "640x480@30Hz"),
                               gen.const(   "VGA_25Hz", int_t, 3, "640x480@25Hz"),
                               gen.const(  "QVGA_25Hz", int_t, 4, "320x240@25Hz"),
                               gen.const(  "QVGA_30Hz", int_t, 5, "320x240@30Hz"),
                               gen.const(  "QVGA_60Hz", int_t, 6, "320x240@60Hz"),
                               gen.const( "QQVGA_25Hz", int_t, 7, "160x120@25Hz"),
                               gen.const( "QQVGA_30Hz", int_t, 8, "160x120@30Hz"),
                               gen.const( "QQVGA_60Hz", int_t, 9, "160x120@60Hz")],
                               "output mode")

gen.add("image_mode", int_t, 0, "Image output mode for the color/grayscale image", 2, 1, 9, edit_method = output_mode_enum)
gen.add("depth_mode", int_t, 0, "depth output mode", 2, 2, 9, edit_method = output_mode_enum)

gen.add("depth_registration", bool_t, 0, "Depth data registration", False)

gen.add("data_skip",  int_t, 0, "Skip N images for every image published (rgb/depth/depth_registered/ir)", 0, 0, 10)

gen.add("depth_time_offset", double_t, 0, "depth image time offset in seconds", 0.0, -1.0, 1.0 );
gen.add("image_time_offset", double_t, 0, "image time offset in seconds", 0.0, -1.0, 1.0 );

gen.add("depth_ir_offset_x", double_t, 0, "X offset between IR and depth images", 5.0, -10.0, 10.0)
gen.add("depth_ir_offset_y", double_t, 0, "Y offset between IR and depth images", 4.0, -10.0, 10.0)
gen.add("z_offset_mm", int_t, 0, "Z offset in mm", 0, -50, 50)

exit(gen.generate(PACKAGE, "OpenNI", "OpenNI"))
